package com.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pojo.MovieList;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Map;

public interface MovieListDAO extends BaseMapper<MovieList> {

    @Update("update movie_list set is_it_on_the_shelf=0 where copyright_expiration_time<now()")
    void xiajiaExpire();

    //根据类别获取电影并排序
    public IPage getSortDyByType(Page p, @Param("m") Map m);
}
